<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="com.jaxplat.commons.Row"%>
<%@page import="com.jaxplat.commons.RowImpl"%>
<%@page import="com.rs.rsbiz.reserve.entity.ReserveOrder"%>
<%@page import="com.jaxplat.util.DateUtils"%>
<%@page import="com.rs.rsbiz.reserve.entity.ReserveOrderBill"%>
<%@page import="com.rs.commons.RsConstant"%>
<%
    String contextPath = request.getContextPath();
    ReserveOrder lockedOrder = new ReserveOrder();
    if (null != request.getAttribute("lockedOrder") && request.getAttribute("lockedOrder") instanceof ReserveOrder)
    {
        lockedOrder = (ReserveOrder) request.getAttribute("lockedOrder");
    }
    Row dsInfo = (Row) request.getAttribute("dsInfo");
    ReserveOrderBill orderBill = (ReserveOrderBill) request.getAttribute("orderBill");

    Row callbackInfo = (Row) request.getAttribute("callbackInfo");

    String token = null;
    String url = null;
    String method = null;
    String sessionId = null;

    token = callbackInfo.getString("token");
    url = callbackInfo.getString("url");
    method = callbackInfo.getString("method");
    sessionId = callbackInfo.getString("sessionId");
%>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="keywords" content="<%=session.getAttribute("keywords")%>" />
	<meta name="description"
		content="<%=session.getAttribute("description")%>" />
	<title>预约结果-云南移动无线城市</title>
	<link type="text/css" href="<%=contextPath%>/css/wap.css"
		rel="stylesheet" />
	<script type="text/javascript" src="<%=contextPath%>/js/jquery-easyui-1.3/jquery-1.7.2.min.js"></script>
	<script type="text/javascript">
	function submitForm()
	{

		$("#form1").attr('target','_blank');
		$("#form1").submit();
		document.getElementById('divPay').style.display="none";
		document.getElementById('divPayResult').style.display="block";
	}
	
	function gotoPayResult(payResult)
	{
		if(payResult==0)
		{
			document.location.href='<%=contextPath%>/wap/reserveManageAction.do?method=viewReserveOrder&orderId=<%=lockedOrder.getOrderId()%>';
		}
		else
		{
			document.location.href='<%=contextPath%>/wap/reserveManageAction.do?method=viewReserveOrder&orderId=<%=lockedOrder.getOrderId()%>';
			//$.unblockUI(); 
		}
	}
	</script>
</head>
<body>
<%=session.getAttribute("headerContentWeb")%>
	<div class="wap">
		<div class="navW">
			<div class="marginAout navIn">
				<span><a href="<%=contextPath%>/wap/index.jsp?portaltype=1&version=2&areacode=<%=session.getAttribute("areacode") %>">预约管理</a> </span><span
					class="current"><a
					href="<%=request.getContextPath()%>/wap/doctorAction.do?method=initSearch_s1">预约挂号</a>
				</span><span><a href="<%=request.getContextPath()%>/wap/guide.jsp?portaltype=1&version=2&areacode=<%=session.getAttribute("areacode") %>">用户指南</a>
				</span>
			</div>
		</div>
		<div class="bread_nav2">
			<div class="step">
				<span>填写</span><span>→</span><span>确认</span><span>→</span>
				<span class="on">支付</span><span>→</span><span>完成</span>
			</div>
		</div>
		<div class="thks">
			<p>
				亲爱的用户：
				<br />
				&nbsp;&nbsp;&nbsp;&nbsp;感谢使用
				<a href="http://www.ynicity.cn">云南移动无线城市</a>-手机预约挂号系统！
				<br />
				&nbsp;&nbsp;&nbsp;&nbsp;您的预约挂号支付成功后，您将收到扣费通知和预约信息短信， 请您保存好您接收到的信息。您也可以进入
				<a href="<%=contextPath%>/wap/searchMyReserve.jsp">我的预约</a>页面查看预约订单状态。
			</p>
		</div>
		<div class="h_div">
			<h1 class="h1">
				预约基本信息
			</h1>
		</div>
		<div class="tab_containt">
			<p>
				<span class="span_b">预约编号：</span><%=lockedOrder.getOrderId()%>
			</p>

			</p>
			<p>
				<span class="span_b">医&nbsp;&nbsp;&nbsp;&nbsp;院： </span><%=dsInfo.getString("hos_name")%>
			</p>
			<p>
				<span class="span_b">科&nbsp;&nbsp;&nbsp;&nbsp;室：</span><%=dsInfo.getString("sec_name")%></p>
			<p>
				<span class="span_b">预约专家：</span><%=dsInfo.getString("doctor_name")%></p>
			<p>
				<span class="span_b">职&nbsp;&nbsp;&nbsp;&nbsp;称：</span><%=dsInfo.getString("pro_title_name")%></p>
			<p>
				<span class="span_b">就诊时间：</span><%=DateUtils.formatDateToMin(lockedOrder.getReserveTime())%></p>
			<p>
				<span class="span_b">挂号费用： </span><span class="colorR"><%=com.rs.util.Utils.formatMoney(RsConstant.DOCTOR_FEE.getDouble(dsInfo.getString("pro_title")), "0.00")%></span>元
			</p>
			<p>
				<span class="span_b">信息费：</span><span style="color: #fc4519;"><%=com.rs.util.Utils.formatMoney(RsConstant.RS_INFO_SERVICE_FEE, "0.00")%></span>元
			</p>
		</div>
		<div class="h_div">
			<h1 class="h1">
				支付信息
			</h1>
		</div>
		<div class="tab_containt">
			<p>
				<span class="span_b">支付方式：</span>
				<%
				    if ("1".equals(orderBill.getPayType().toString()))
				    {
				        out.print("手机支付");
				    }
				%>
			</p>
			<p>
				<span class="span_b">支付手机号： </span>
				<%=lockedOrder.getMobileNo()%>
			</p>
		</div>
		<div class="h_div">
			<h1 class="h1">
				患者基本信息
			</h1>
		</div>
		<div class="tab_containt">
			<p>
				<span class="span_b">患者姓名：</span>
				<%=lockedOrder.getApplicantName()%>
			</p>
			<p>
				<span class="span_b">身份证号： </span>
				<%=lockedOrder.getIdNo()%>
			</p>
			<p>
				<span class="span_b">性&nbsp;&nbsp;&nbsp;&nbsp;别： </span>
				<%
				    if ("m".equals(lockedOrder.getGender()))
				    {
				        out.print("男");
				    }
				    else
				    {
				        out.print("女");
				    }
				%>
			</p>
			<p>
				<span class="span_b">出生年月：</span>
				<%=lockedOrder.getBirthDate()%>
				<p>
					<span class="span_b">住&nbsp;&nbsp;&nbsp;&nbsp;址：</span>
					<%=lockedOrder.getApplicantAddr()%>
				</p>
				<div id="divPay" class="btn_ul">
					<form id="form1" name="form1" 
						method="<%=method == null ? "post" : method%>"
						action="<%=url == null ? "" : url%>">
						<ul>
							<li>

								<input name="SESSIONID" type="hidden" id="SESSIONID"
									value="<%=sessionId == null ? "" : sessionId%>" />
								<input type="button" onclick="submitForm()" value="支&nbsp;&nbsp;付" class="btnN" />
							</li>

						</ul>
					</form>
					<div class="clear"></div>
				</div>
				
				<div id="divPayResult" class="btn_ul" style="display:none">
						<ul>
							<li>


								<input  type="button" onclick="gotoPayResult(0)"
									value="支付成功" class="btnN" />
								&nbsp;
								<input  type="button" onclick="gotoPayResult(0)"
									value="支付失败" class="btnN" />
							</li>

						</ul>
					<div class="clear"></div>
				</div>
		</div>
		<div class="note">
			<div class="n_div">
				<h1 class="h1">
					重要声明
				</h1>
			</div>
			<p>
				您的订单已提交，请留意支付确认短信，当您回复确认支付短信后，
				方视为您与手机预约系统之间就实际直接建立了合同关系，将从您的手机银行账户中扣除预约挂号费。
			</p>
			<p>
				您也可以在您预约的时间前一天拔打12580，通过语音服务取消预约，并退回预约挂号费。
			</p>
		</div>
	</div>
<%=session.getAttribute("footerContentWeb")%>
</body>
</html>